package com.xcc.feign.modules.controller.serivce.error;
import com.xcc.common.entry.User;
import com.xcc.common.result.ResultBody;
import com.xcc.feign.modules.controller.serivce.UserFeignService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @author frosty
 * @description  UserFeignService 服务出错是调用的方法    觉得每个方法都要写  有点麻烦
 * @date 2019-11-11 11:16:43
 */
@Component
public class UserServiceError implements UserFeignService {
    private Logger logger = LoggerFactory.getLogger(UserServiceError.class);
    @Override
   public   ResultBody  register(User user){
            logger.error("register service ----> 出错");
         return ResultBody.error("register server error");
    }

    @Override
    public ResultBody find(String id) {
        logger.error("find by id service ----> 出错");
        return ResultBody.error("find  by id  error"+id);
    }

}
